home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / mobile / fma-2.0-stable-setup.exe / {app} / sframework / plugins / Mouse.vbs < prev    next >
Encoding:
Text File  |  2004-09-09  |  4.9 KB  |  87 lines

  1. 'FMA Script Framework Plugin
  2. 'Mouse
  3. 'Control your mouse
  4.  
  5. 'TODO:
  6. '-nothing atm
  7.  
  8. Class Mouse
  9.     
  10.     Private llist
  11.     Private m_Self
  12.     
  13.     'Some info about the plugin
  14.     Public Property Get SHOWABLE 'Do I have a menu?
  15.         SHOWABLE    = True
  16.     End Property
  17.     Public Property Get TITLE 'What's my name?
  18.         TITLE       = "Mouse"
  19.     End Property
  20.     Public Property Get DESCRIPTION 'What's my purpose?
  21.         DESCRIPTION = "Conotrol your mouse!"
  22.     End Property
  23.     Public Property Get AUTHOR 'Who created me?
  24.         AUTHOR      = "streawkceur"
  25.     End Property
  26.     Public Property Get URL 'Were can I be found? Where can you get more information?
  27.         URL = "http://fma.xinium.com/"
  28.     End Property
  29.     
  30.     'Who am I?
  31.     Public Property Let Self (s)
  32.         m_Self = s
  33.     End Property
  34.     Public Property Get Self
  35.         Self = m_Self
  36.     End Property
  37.     
  38.     'Display me. Eventually put a menu on the screen
  39.     Sub Show()
  40.         'Push empty menu to prevent switching pages of the previous menu
  41.         EmptyMenu.ShowMenu
  42.         'No Menu here. Just show information and register keys.
  43.         am.Back = Self & ".Quit" 'Mangage the menu quit by ourselves
  44.         am.DlgMsgBox "Mouse control: Use your joystick or keypad numbers to move. */5 = leftclick, # = right click"
  45.         'KeyPad
  46.         KeyManager.RegisterKey   KEY_1,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""NW""",STATE_PRESS  , Me
  47.         KeyManager.RegisterKey   KEY_2,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""N""", STATE_PRESS  , Me
  48.         KeyManager.RegisterKey   KEY_3,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""NE""",STATE_PRESS  , Me
  49.         KeyManager.RegisterKey   KEY_4,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""W""", STATE_PRESS  , Me
  50.         KeyManager.RegisterKey   KEY_5,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseLeftClick",  STATE_PRESS  , Me
  51.         KeyManager.RegisterKey   KEY_6,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""E""", STATE_PRESS  , Me
  52.         KeyManager.RegisterKey   KEY_7,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""SW""",STATE_PRESS  , Me
  53.         KeyManager.RegisterKey   KEY_8,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""S""", STATE_PRESS  , Me
  54.         KeyManager.RegisterKey   KEY_9,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""SE""",STATE_PRESS  , Me
  55.         KeyManager.RegisterKey   KEY_ASTERIX,   "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseLeftClick",  STATE_PRESS  , Me
  56.         KeyManager.RegisterKey   KEY_SHARP,     "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseRightClick", STATE_PRESS  , Me
  57.         KeyManager.RegisterKey     KEY_1,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  58.         KeyManager.RegisterKey     KEY_2,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  59.         KeyManager.RegisterKey     KEY_3,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  60.         KeyManager.RegisterKey     KEY_4,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  61.         KeyManager.RegisterKey     KEY_6,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  62.         KeyManager.RegisterKey     KEY_7,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  63.         KeyManager.RegisterKey     KEY_8,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  64.         KeyManager.RegisterKey     KEY_9,         "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  65.         KeyManager.RegisterKey   KEY_ASTERIX,   "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  66.         KeyManager.RegisterKey   KEY_SHARP,     "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  67.         'JoyStick
  68.         KeyManager.RegisterKey   KEY_JOYLEFT,   "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""W""", STATE_PRESS  , Me
  69.         KeyManager.RegisterKey   KEY_JOYUP,     "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""N""", STATE_PRESS  , Me
  70.         KeyManager.RegisterKey   KEY_JOYRIGHT,  "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""E""", STATE_PRESS  , Me
  71.         KeyManager.RegisterKey   KEY_JOYDOWN,   "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseMove ""S""", STATE_PRESS  , Me
  72.         KeyManager.RegisterKey     KEY_JOYLEFT,   "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",          STATE_RELEASE, Me
  73.         KeyManager.RegisterKey     KEY_JOYUP,     "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  74.         KeyManager.RegisterKey     KEY_JOYRIGHT,  "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  75.         KeyManager.RegisterKey     KEY_JOYDOWN,   "ActiveXManager(""floAtMediaCtrl.MouseCtrl"").MouseStop",       STATE_RELEASE, Me
  76.     End Sub
  77.     
  78.     Sub Quit
  79.         'Unregister all our key events:
  80.         KeyManager.DeregisterAll Me
  81.         'Remove emtpy menu
  82.         MenuStack.Top.Quit
  83.     End Sub
  84.     
  85. End Class
  86.  
  87.